#pragma once
#include <list>
#include <WinSock2.h>
#include "SDL_ttf.h"
#include "Button.h"
#include "Player.h"
#include "Checker.h"
#include "Animation.h"

extern char* windowPixels;
extern TTF_Font* mainTitleFont;
extern TTF_Font* buttonFont;
extern TTF_Font* costFont;
extern TTF_Font* descFont;
extern TTF_Font* titleFont;
extern TTF_Font* attributeFont;
extern TTF_Font* GUICostFont;
extern TTF_Font* ResultFont;
extern SDL_Color colorBlack;
extern SDL_Color colorWhite;
extern SDL_Window* window;
extern SDL_Renderer* renderer;
extern SDL_Texture* mainmenuButtonTexture;
extern SDL_Texture* mainmenuButtonPressedTexture;
extern SDL_Texture* turnChangeButtonTexture;
extern SDL_Texture* turnChangeButtonPressedTexture;
extern SDL_Texture* backButtonTexture;
extern SDL_Texture* backButtonPressedTexture;
extern SDL_Texture* PlayerTurnChangeTexture;
extern SDL_Texture* EnemyTurnChangeTexture;
extern SDL_Texture* mapTexture;
extern SDL_Texture* hitTexture;
extern SDL_Texture* cardTexture;
extern SDL_Texture* cardBackTexture;
extern SDL_Texture* checkerSideSelfTexture;
extern SDL_Texture* checkerSideEnemyTexture;
extern SDL_Texture* netBGTexture;
extern SDL_Texture* netPointerTexture;
extern SDL_Texture* gameoverBGTexture;
extern SDL_Texture* cardTitleTexture;
extern SDL_Surface* cardSurface;
extern int globalState;
extern int targetState;
extern int selectState;
extern bool isQuit;
extern bool isSceneChanging;
extern bool isTurnChanging;
extern bool isGameOverChanging;
extern bool isAnimation;
extern bool isSelecting;
extern bool mapSelectBuffer;
extern bool directAttack;
extern bool isSelectingDirectAttack;
extern int globalCounter;
extern list<Button*> mainmenuButtonList;
extern list<Button*> gameplayingButtonList;
extern list<Button*> gameoverButtonList;
extern list<Button*> netprocessButtonList;
extern list<Button*> deckeditButtonList;
extern list<Button*> aboutButtonList;
extern list<Button*>* currentButtonList;
extern list<Animation*> animationList;
extern int mouseX;
extern int mouseY;
extern int selectX;
extern int selectY;
extern list<Card*> usingDeck;
extern list<Card*> enemyDeck;
extern Card* cardShown;
extern int attackShown;
extern int healthShown;
extern int moveShown;
extern bool isShowingChecker;
extern list<int> destroyX;
extern list<int> destroyY;
extern Player* player;
extern Player* enemyPlayer;
extern Checker* board[7][9];
extern bool selectBoard[7][9];
extern bool isPlayerTurn;
extern bool isPlayerInitDone;
extern list<Handcard*>::iterator selectedCard;
extern list<Handcard*>::iterator enemySelectedCard;
extern int selectedCheckerX;
extern int selectedCheckerY;
extern bool isSinglePlayer;
extern list<string> ipAddressToLink;
extern string hostIp;
extern int ipPointed;
extern wstring ipInfo;
extern bool ipSelectBuffer;
extern bool hasTcpLinked;
extern SOCKET* tcpSocket;
extern list<Card*> editingDeck;
extern Card* unitSelect[2][4];
extern Card* actionSelect[2][4];
extern int selectCardType;
extern Card* selectedShownCard;
extern Card* (*cardptr)[2][4];
extern bool cardSelectBuffer;
extern bool deckSelectBuffer;
extern list<wstring> aboutText;